<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gps: gps Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">gps
   &#160;<span id="projectnumber">1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">gps Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>gps class  
 <a href="classgps.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="gps_8h_source.html">gps.h</a>&gt;</code></p>

<p><a href="classgps-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgps_1_1channel__s.html">channel_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">channel information  <a href="structgps_1_1channel__s.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgps_1_1date__s.html">date_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">date struct  <a href="structgps_1_1date__s.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgps_1_1_gps_info__s.html">GpsInfo_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">General gps info.  <a href="structgps_1_1_gps_info__s.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgps_1_1_r_m_cstr.html">RMCstr</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Struct to work with $GPRMC string.  <a href="structgps_1_1_r_m_cstr.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgps_1_1time__s.html">time_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">time struct  <a href="structgps_1_1time__s.html#details">More...</a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a13b491233eeef0a9934e8d86db776949"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a13b491233eeef0a9934e8d86db776949">gps</a> ()</td></tr>
<tr class="memitem:a6f0aa175cb89310542170e72e0eaa74c"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a6f0aa175cb89310542170e72e0eaa74c">GetDist</a> (float Lat1, float Lon1, float Lat2, float Lon2)</td></tr>
<tr class="memdesc:a6f0aa175cb89310542170e72e0eaa74c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the distance between to coordinate.  <a href="#a6f0aa175cb89310542170e72e0eaa74c"></a><br/></td></tr>
<tr class="memitem:a0818935ee361cc80d45f5decf61b55eb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a0818935ee361cc80d45f5decf61b55eb">GetBearing</a> (float Lat1, float Lon1, float Lat2, float Lon2)</td></tr>
<tr class="memdesc:a0818935ee361cc80d45f5decf61b55eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the bearing between 2 coordinate.  <a href="#a0818935ee361cc80d45f5decf61b55eb"></a><br/></td></tr>
<tr class="memitem:afeb31896befa19a3c0f6d8025eaa3db7"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#afeb31896befa19a3c0f6d8025eaa3db7">degreeToRadian</a> (float degree)</td></tr>
<tr class="memdesc:afeb31896befa19a3c0f6d8025eaa3db7"><td class="mdescLeft">&#160;</td><td class="mdescRight">convert degree to radian.  <a href="#afeb31896befa19a3c0f6d8025eaa3db7"></a><br/></td></tr>
<tr class="memitem:afc9cc644ebe767cc38cd6be31ff11c1a"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#afc9cc644ebe767cc38cd6be31ff11c1a">radianToDegree</a> (float radian)</td></tr>
<tr class="memdesc:afc9cc644ebe767cc38cd6be31ff11c1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert Radian to Degree.  <a href="#afc9cc644ebe767cc38cd6be31ff11c1a"></a><br/></td></tr>
<tr class="memitem:a88ace6e98d9b3ba264f78bf66f8eb0b5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a88ace6e98d9b3ba264f78bf66f8eb0b5">ProcessNmeaStr</a> (char *nmea, int Len)</td></tr>
<tr class="memdesc:a88ace6e98d9b3ba264f78bf66f8eb0b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an NMEA string.  <a href="#a88ace6e98d9b3ba264f78bf66f8eb0b5"></a><br/></td></tr>
<tr class="memitem:a917af9e2f4feaf978fb1d8d641467849"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a917af9e2f4feaf978fb1d8d641467849">ProcessNmea_RMC</a> (char *nmea, int Len)</td></tr>
<tr class="memdesc:a917af9e2f4feaf978fb1d8d641467849"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process $GPRMC NMEA string.  <a href="#a917af9e2f4feaf978fb1d8d641467849"></a><br/></td></tr>
<tr class="memitem:a06860b3e28085a326e192aa31b5a6236"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a06860b3e28085a326e192aa31b5a6236">dmtodd</a> (char *dm, char NSEW, int LatOrLon)</td></tr>
<tr class="memdesc:a06860b3e28085a326e192aa31b5a6236"><td class="mdescLeft">&#160;</td><td class="mdescRight">NMEA 'degree minute.m' to 'degree.decimal'.  <a href="#a06860b3e28085a326e192aa31b5a6236"></a><br/></td></tr>
<tr class="memitem:ac771c6be4eb9da5e9c996bba209ecfed"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#ac771c6be4eb9da5e9c996bba209ecfed">nttots</a> (char *timestr, <a class="el" href="structgps_1_1time__s.html">time_s</a> &amp;timeReturn)</td></tr>
<tr class="memdesc:ac771c6be4eb9da5e9c996bba209ecfed"><td class="mdescLeft">&#160;</td><td class="mdescRight">NMEA RMC time string to <a class="el" href="structgps_1_1time__s.html" title="time struct">time_s</a> struct.  <a href="#ac771c6be4eb9da5e9c996bba209ecfed"></a><br/></td></tr>
<tr class="memitem:a3e36f5a90e338203a540406a480a89ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a3e36f5a90e338203a540406a480a89ab">gettimestr</a> (char *time)</td></tr>
<tr class="memdesc:a3e36f5a90e338203a540406a480a89ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a time string in char *time.  <a href="#a3e36f5a90e338203a540406a480a89ab"></a><br/></td></tr>
<tr class="memitem:a2f7a4e38be09e9e4260c0d539db8fcc7"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a2f7a4e38be09e9e4260c0d539db8fcc7">ndtods</a> (char *datestr, int fromtype, <a class="el" href="structgps_1_1date__s.html">date_s</a> &amp;dateReturn)</td></tr>
<tr class="memdesc:a2f7a4e38be09e9e4260c0d539db8fcc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">NMEA RMC date string to <a class="el" href="structgps_1_1date__s.html" title="date struct">date_s</a> struct.  <a href="#a2f7a4e38be09e9e4260c0d539db8fcc7"></a><br/></td></tr>
<tr class="memitem:a03933dd318759e475934d53cf187d7e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a03933dd318759e475934d53cf187d7e0">getdatestr</a> (char *date)</td></tr>
<tr class="memdesc:a03933dd318759e475934d53cf187d7e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a date string in char *date.  <a href="#a03933dd318759e475934d53cf187d7e0"></a><br/></td></tr>
<tr class="memitem:a0bf6b4d518da457b1fe0402c44925748"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a0bf6b4d518da457b1fe0402c44925748">ktstokmh</a> (float kts)</td></tr>
<tr class="memdesc:a0bf6b4d518da457b1fe0402c44925748"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert Knots to Kilometers per Hour.  <a href="#a0bf6b4d518da457b1fe0402c44925748"></a><br/></td></tr>
<tr class="memitem:a5f1bdb341a466b9bf565b6ec36ecd625"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a5f1bdb341a466b9bf565b6ec36ecd625">ktstomph</a> (float kts)</td></tr>
<tr class="memdesc:a5f1bdb341a466b9bf565b6ec36ecd625"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert Knots to Miles Per Hour.  <a href="#a5f1bdb341a466b9bf565b6ec36ecd625"></a><br/></td></tr>
<tr class="memitem:ae4c4be1a399edf51f4d9c11f017791ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#ae4c4be1a399edf51f4d9c11f017791ea">ProcessNmea_PMTKCHN</a> (char *nmea, int Len)</td></tr>
<tr class="memdesc:ae4c4be1a399edf51f4d9c11f017791ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process $PMTKCHN 'NMEA style' string.  <a href="#ae4c4be1a399edf51f4d9c11f017791ea"></a><br/></td></tr>
<tr class="memitem:ac06c909571175bf7daa520d9f375ad84"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#ac06c909571175bf7daa520d9f375ad84">CheckNmeaChecksum</a> (char *nmea, int Len)</td></tr>
<tr class="memdesc:ac06c909571175bf7daa520d9f375ad84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check NMEA Checksum.  <a href="#ac06c909571175bf7daa520d9f375ad84"></a><br/></td></tr>
<tr class="memitem:a6d3483d4e413979a88bff31ec5a4eca4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a6d3483d4e413979a88bff31ec5a4eca4">getCheckSum</a> (char *string)</td></tr>
<tr class="memdesc:a6d3483d4e413979a88bff31ec5a4eca4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get checksum.  <a href="#a6d3483d4e413979a88bff31ec5a4eca4"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a7b0dca0379f5094698d5735b82bae36f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#a7b0dca0379f5094698d5735b82bae36f">valid</a></td></tr>
<tr class="memdesc:a7b0dca0379f5094698d5735b82bae36f"><td class="mdescLeft">&#160;</td><td class="mdescRight">validity tag  <a href="#a7b0dca0379f5094698d5735b82bae36f"></a><br/></td></tr>
<tr class="memitem:ab9a5b2f24ebab720c5de80180c5132c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structgps_1_1_gps_info__s.html">GpsInfo_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#ab9a5b2f24ebab720c5de80180c5132c8">GpsInfo</a></td></tr>
<tr class="memdesc:ab9a5b2f24ebab720c5de80180c5132c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global variable GPS Information.  <a href="#ab9a5b2f24ebab720c5de80180c5132c8"></a><br/></td></tr>
<tr class="memitem:abf96b08c94a86b854ac2f61e1c8137dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structgps_1_1channel__s.html">channel_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgps.html#abf96b08c94a86b854ac2f61e1c8137dc">chan</a> [<a class="el" href="gps__setup_8h.html#af98456070a63f454dbd60f56a7907616">TOTAL_CHANNEL</a>]</td></tr>
<tr class="memdesc:abf96b08c94a86b854ac2f61e1c8137dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global Channel Info.  <a href="#abf96b08c94a86b854ac2f61e1c8137dc"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>gps class </p>
<p>The gps class is a collection of tool to deal with gps and navigation data. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a13b491233eeef0a9934e8d86db776949"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gps::gps </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor that create an instance of <a class="el" href="classgps.html#a13b491233eeef0a9934e8d86db776949">gps()</a> </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac06c909571175bf7daa520d9f375ad84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean gps::CheckNmeaChecksum </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>nmea</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check NMEA Checksum. </p>
<p>Confirm that the checksum on a given NMEA string is valid. This Function is only included if CHECKSUM_ENABLE is defined in <a class="el" href="gps__setup_8h.html" title="SETUP FILE for the GPS utility library.">gps_setup.h</a> </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">nmea</td><td>The NMEA string to confirm the checksum. </td></tr>
    <tr><td class="paramname">Len</td><td>The lenght of the NMEA string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>boolean true = checksum valid, false = checksum failed. </dd></dl>

</div>
</div>
<a class="anchor" id="afeb31896befa19a3c0f6d8025eaa3db7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float gps::degreeToRadian </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>degree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>convert degree to radian. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">degree</td><td>the degree to convert in radia. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>float radian </dd></dl>

</div>
</div>
<a class="anchor" id="a06860b3e28085a326e192aa31b5a6236"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float gps::dmtodd </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>dm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>NSEW</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>LatOrLon</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>NMEA 'degree minute.m' to 'degree.decimal'. </p>
<p>Used to convert an NMEA style 'degree minute.m' string to a float 'degree.decimal'. The expected string format is: -LATITUDE: ddmm.mm -LONGITUTE: dddmm.mm </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">dm</td><td>string that contain the NMEA style 'degree minute.m' information. </td></tr>
    <tr><td class="paramname">NSEW</td><td>char the represent the cardinal direction of the dm string. Can be 'N' 'S' 'E' 'W'. </td></tr>
    <tr><td class="paramname">LatOrLon</td><td>Latitude or Longitude tag. Use the define TYPE_LAT or TYPE_LON </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>float that represent the Degree.decimal </dd></dl>

</div>
</div>
<a class="anchor" id="a0818935ee361cc80d45f5decf61b55eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int gps::GetBearing </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lat1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lon1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lat2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lon2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the bearing between 2 coordinate. </p>
<p>Get the bearing in Degree between 2 coordinate. The coordinate expected format is float Degree.Decimal. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">Lat1</td><td>Latitude of coordinate 1. </td></tr>
    <tr><td class="paramname">Lon1</td><td>Longitude of coordinate 1. </td></tr>
    <tr><td class="paramname">Lat2</td><td>Latitude of coordinate 2. </td></tr>
    <tr><td class="paramname">Lon2</td><td>Longitude of coordinate 2. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>float bearing in degree. </dd></dl>

</div>
</div>
<a class="anchor" id="a6d3483d4e413979a88bff31ec5a4eca4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int gps::getCheckSum </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>string</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get checksum. </p>
<p>Get the Checksum value for a given NMEA string. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>The NMEA string to generate a Checksum from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>int Checksum </dd></dl>

</div>
</div>
<a class="anchor" id="a03933dd318759e475934d53cf187d7e0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gps::getdatestr </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>date</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a date string in char *date. </p>
<p>This function will format a string that contain the date in char *date. Based on what NMEA message are enabled, the string will be YY-MM-DD or YYYY-MM-DD. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">date</td><td>char array in wich the date will be formated. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6f0aa175cb89310542170e72e0eaa74c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float gps::GetDist </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lat1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lon1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lat2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>Lon2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the distance between to coordinate. </p>
<p>Get the distance in KM between 2 coordinate. The coordinate expected format is float Degree.Decimal. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">Lat1</td><td>Latitude of coordinate 1. </td></tr>
    <tr><td class="paramname">Lon1</td><td>Longitude of coordinate 1. </td></tr>
    <tr><td class="paramname">Lat2</td><td>Latitude of coordinate 2. </td></tr>
    <tr><td class="paramname">Lon2</td><td>Longitude of coordinate 2. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>float Distance in Kilometters. </dd></dl>

</div>
</div>
<a class="anchor" id="a3e36f5a90e338203a540406a480a89ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gps::gettimestr </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a time string in char *time. </p>
<p>This function will format a string that contain the time in char *time. The string format will be HH:MM:SS.sss. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">time</td><td>char array in wich the time will be formated. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0bf6b4d518da457b1fe0402c44925748"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float gps::ktstokmh </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>kts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert Knots to Kilometers per Hour. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">kts</td><td>the Knots to convert in KM/H </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>float KM/H </dd></dl>

</div>
</div>
<a class="anchor" id="a5f1bdb341a466b9bf565b6ec36ecd625"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float gps::ktstomph </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>kts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert Knots to Miles Per Hour. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">kts</td><td>The Knots to convert to MPH </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>float MPH </dd></dl>

</div>
</div>
<a class="anchor" id="a2f7a4e38be09e9e4260c0d539db8fcc7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean gps::ndtods </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>datestr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fromtype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structgps_1_1date__s.html">date_s</a> &amp;&#160;</td>
          <td class="paramname"><em>dateReturn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>NMEA RMC date string to <a class="el" href="structgps_1_1date__s.html" title="date struct">date_s</a> struct. </p>
<p>Used internaly, this function is used to set the date from an NMEA string in the <a class="el" href="structgps_1_1date__s.html" title="date struct">date_s</a> struct dateReturn. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">datestr</td><td>NMEA date string. </td></tr>
    <tr><td class="paramname">fromtype</td><td>The type of NMEA date string (NMEA_RMC, NMEA_ZDA, ...) </td></tr>
    <tr><td class="paramname">dateReturn</td><td>The <a class="el" href="structgps_1_1date__s.html" title="date struct">date_s</a> struct to store the date in. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>true = valid convertion, false = error in convertion. </dd></dl>

</div>
</div>
<a class="anchor" id="ac771c6be4eb9da5e9c996bba209ecfed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean gps::nttots </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>timestr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structgps_1_1time__s.html">time_s</a> &amp;&#160;</td>
          <td class="paramname"><em>timeReturn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>NMEA RMC time string to <a class="el" href="structgps_1_1time__s.html" title="time struct">time_s</a> struct. </p>
<p>Used internaly, this function is used to set the time in timeReturn <a class="el" href="structgps_1_1time__s.html" title="time struct">time_s</a> struct from an NMEA RMC time string. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">timestr</td><td>NMEA RMC time string. </td></tr>
    <tr><td class="paramname">timeReturn</td><td>Then <a class="el" href="structgps_1_1time__s.html" title="time struct">time_s</a> struct to set the time in. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>bool true on convertion sucess, false on error. </dd></dl>

</div>
</div>
<a class="anchor" id="ae4c4be1a399edf51f4d9c11f017791ea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gps::ProcessNmea_PMTKCHN </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>nmea</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process $PMTKCHN 'NMEA style' string. </p>
<p>Used internaly by ProcessNmeaStr, this function process the MTK $PMTKCHN message. PMTKCHN_ENABLE must be defined in <a class="el" href="gps__setup_8h.html" title="SETUP FILE for the GPS utility library.">gps_setup.h</a> for this function to be included. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">nmea</td><td>char array that contain de NMEA string </td></tr>
    <tr><td class="paramname">Len</td><td>int that represent the lenght of the NMEA string. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a917af9e2f4feaf978fb1d8d641467849"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gps::ProcessNmea_RMC </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>nmea</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process $GPRMC NMEA string. </p>
<p>Used internaly by ProcessNmeaStr, this function process the NMEA $GPRMC message. This function is always included and cannot be turned off in <a class="el" href="gps__setup_8h.html" title="SETUP FILE for the GPS utility library.">gps_setup.h</a> </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">nmea</td><td>char array that contain de NMEA string </td></tr>
    <tr><td class="paramname">Len</td><td>int that represent the lenght of the NMEA string. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a88ace6e98d9b3ba264f78bf66f8eb0b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int gps::ProcessNmeaStr </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>nmea</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process an NMEA string. </p>
<p>Process an NMEA string. The function expect a correctly formated NMEA string. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">nmea</td><td>char array that contain de NMEA string </td></tr>
    <tr><td class="paramname">Len</td><td>int that represent the lenght of the NMEA string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>int &lt;0 on error, &gt;0 on success. </dd></dl>

</div>
</div>
<a class="anchor" id="afc9cc644ebe767cc38cd6be31ff11c1a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float gps::radianToDegree </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>radian</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert Radian to Degree. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">radian</td><td>The radian to convert in degree. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>float degree. </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="abf96b08c94a86b854ac2f61e1c8137dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gps::chan</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global Channel Info. </p>
<p>This Global variable is used to store the channel information extracted from the NMEA style MTK device $PMTKCHN string. By default the size of the array is 66. The array size can be overrided in <a class="el" href="gps__setup_8h.html" title="SETUP FILE for the GPS utility library.">gps_setup.h</a> using the TOTAL_CHANNEL define. </p>

</div>
</div>
<a class="anchor" id="ab9a5b2f24ebab720c5de80180c5132c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gps::GpsInfo</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global variable GPS Information. </p>
<p>This Global variable of type <a class="el" href="structgps_1_1_gps_info__s.html" title="General gps info.">GpsInfo_s</a> is used to store the processed GPS information. </p>

</div>
</div>
<a class="anchor" id="a7b0dca0379f5094698d5735b82bae36f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gps::valid</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>validity tag </p>
<p>This vriable indicate if the gps data are Active or Void. use the define VALID_ACTIVE and VALID_VOID to check the validity. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>E:/CODING/arduino-1.0/libraries/gps/<a class="el" href="gps_8h_source.html">gps.h</a></li>
<li>E:/CODING/arduino-1.0/libraries/gps/<a class="el" href="gps_8cpp.html">gps.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat May 26 2012 18:48:47 for gps by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1
</small></address>
</body>
</html>
